/* 
 * Gneat (http://gneat.org)
 *
 * (C) Copyright 2011 and beyond - Claudio Stella, all rights reserved.
 *
 * This file is part of Gneat.
 *
 * Gneat is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL)
 * as published by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gneat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * and the GNU General Public License, for completeness, along with Gneat.  
 * If not, see <http://www.gnu.org/licenses/>.
 */
package org.neatshell.gneat.client.presenter.core.traversing;

import org.neatshell.gneat.client.presenter.core.IPresenter;
import org.neatshell.gneat.client.presenter.core.IPresenterList;

public interface Filtering {
	boolean has(IPresenter... contained);
	boolean has(IPresenterList list);
	
	/**
	 * Check if this object is an instance of {@link Presenter} or {@link PresenterNull}.
	 * <b>WARNING:</b> if you need to check if the underlied NODE is an ELEMENT, call is(1)
	 * @return true if this is a {@link Presenter}, false otherwise.
	 */
	boolean is();
	
	/**
	 * Check if this Presenter underlies a node of the passed type.
	 * @param nodeType the type of node to test this Presenter's underlying NODE type against.
	 * @return true if matches, false otherwise.
	 */
	boolean is(Integer nodeType);

	/**
	 * Check if this Presenter matches at least one item from the passed array of Presenter objects.
	 * @param presenters an array of Presenter objects to match this Presenter against.
	 * @return true if matches, false otherwise.
	 */
	boolean is(IPresenter... presenters);

	/**
	 * Check if this Presenter matches at least one item from the passed PresenterList.
	 * @param list a PresenterList containing the items to match against this Presenter.
	 * @return true if matches, false otherwise.
	 */
	boolean is(IPresenterList list);
}